package cn.kgc.service.document;

import cn.kgc.dao.document.gth_documentDao;
import cn.kgc.pojo.Document;
import com.github.pagehelper.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class gth_documentServerimpl implements gth_documentServer{

    @Resource
    public gth_documentDao gth;

    @Override
    public Page<Document> selall(String title, Integer type, String createDate, Integer id, Integer u_id) {
        return gth.selall(title,type,createDate,id,u_id);
    }

    @Override
    public List<Document> selbyid(Integer id, String title,Integer u_id) {
        return gth.selbyid(id,title,u_id);
    }

    @Override
    public Page<Document> selrecall(Integer u_id) {
        return gth.selrecall(u_id);
    }

    @Override
    public int coupdate(Integer id, String title) {
        return gth.coupdate(id,title);
    }

    @Override
    public Document lookbyid(Integer id,Integer u_id) {
        return gth.lookbyid(id,u_id);
    }

    @Override
    public int reupdate(Integer id) {
        return gth.reupdate(id);
    }

    @Override
    public int cateupdate(Integer id) {
        return gth.cateupdate(id);
    }

    @Override
    public int redel(Integer id) {
        return gth.redel(id);
    }

    @Override
    public int addfile(String title, Integer dp_id, String path, Integer  parentId,Integer u_id) {
        return gth.addfile(title,dp_id,path,parentId,u_id);
    }

    @Override
    public Boolean repeatName(String title) {
        if (gth.repeatName(title) != null){
            return true;
        }
        return false;
    }

    @Override
    public int save(Document document) {
        return gth.save(document);
    }

    @Override
    public Document lookall(Integer id, Integer u_id) {
        return gth.lookall(id, u_id);
    }

    @Override
    public List<Document> echar(Integer u_id) {
        return gth.echar(u_id);
    }


}
